#===============================================================================
# UserSettings.mk
#
#------------------------------------------------------------------------------
# K. James Durbin    					
#===============================================================================
# $Id:$
#------------------------------------------------------------------------------


# -----------------------------------------------------------------------------
#                            User Settings 
# -----------------------------------------------------------------------------
# Environment variables the user should set, or at least check to see
# if the defaults make sense. Each variable is surrounded by an ifndef 
# block, so that if the variable has been defined in the environment it 
# overrides the defaults shown here. 

# Summary of must define variables:
# CBT_ROOT			Location of CBT++ directory. 
# GCCVERSION  (GCC2 or GCC3) 	Wether GCC is version 2.9.x or 3.x.x. 
# GCC 				Location of gcc executable. 


# CBT_ROOT	points to the root where the CBT++ include and src are found. 
#               Typically this will be something like ~/CBT++ (i.e. src and 
#               include in ~/CBT++/src ~/CBT++/include). 
#
ifndef CBT_ROOT
CBT_ROOT= ~/CBT++
endif 


#=============================================================================
# Compiler
#=============================================================================

# GCC is the default compiler for CBT++.  The Forte compiler (Solaris) is 
# also supported, and the Intel compiler (Linux) will soon be supported. 
# Those are taken to be special cases, and users wishing to use those compilers
# will have to edit constants in makefiles/Forte.mk  or makefiles/Intel.mk. 

# GCC VERSION (GCC2 or GCC3).  There are some minor include differences 
# between these two versions that are conditional on this variable. 
ifndef GCCVERSION 
	GCCVERSION=GCC2
endif 

# Path to GCC.   Special compilers (e.g. Sun forte for 64-bit clean compiles) 
# are handled separately with special makefiles. 
ifndef GCC 
	GCC = /home/hgsc/bin/gcc -D$(GCCVERSION)
endif 





#=============================================================================
# Compiler Flags 
#=============================================================================
# 
# GCC 3, or at least the OSX version, has a optimize for space
# option.  Space is the biggest factor for most of our applications
# so this optimization is preferred over -O3 whenever it is available. 
#
# With OSX, also want to enable altivec optimization. 
#
# # tpp2 is for Itanium2  -w disables warnings.  -cxxlib-gcc uses gcc headers for STL
# 
ifndef FASTFLAG  
	ifeq ($(GCCVERSION),ICC)	
	FASTFLAG = -tpp2 -w 
# This options below are great for gcc compatibility, but doesn't get us 
#  64-bit support. 
#		FASTFLAG = -tpp2 -w -cxxlib-gcc
	else
		ifeq ($(GCCVERSION),GCC3)
			ifeq ($(OSTYPE),osx-apple)
				FASTFLAG = -faltivec -Os 
			else
				FASTFLAG = -Os 
			endif
		else 
			FASTFLAG = -O3
		endif # else not GCC3
	endif # 	ICC
endif # ndef FASTFLAG 











